% Back out fixed costs from calibrated re-scaled fixed costs and
% equilibrium S,P and w. See calibration appendix.

function [fc_norm,fx_norm,FX_norm,FM_norm,FXM_norm] = NormalizedFC(fc, fx, FX,FM,FXM,S,P,w,param)

g = param.gamma; 
sg = param.sg;
eta = param.eta;
qD = param.qD;
theta = param.theta;
z = param.z;
tau = param.tau;
bl = param.bl;

fc_norm = P^((sg-1)*(1-g) + 1/eta ) * S /w * (qD*z)^(-1/eta) * (sg-1)^sg / (sg^sg) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) *eta * g * fc * w^(-(sg-1)*(1-g));
fx_norm = ((1+tau)^(theta *(sg-1)) * P^((sg-1)*(1-g*(1-theta))) * S * (g*qD)^(g*(sg-1)*(1-theta)) * (1-g)^((1-g)*(sg-1)*(1-theta)) *  (sg-1)^((1-theta)*(sg-1)) * sg^(sg*(theta-1)) * bl^(-theta) * (1/w) ^(-(theta-1)*((sg-1)*(1-g)+1)) * (theta-1)/theta).^(1/(1-theta)) * fx;
FXM_norm = sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * P^((sg-1)*(1-g) ) * S * FXM * (1/w)^((sg-1)*(1-g)+1);
FM_norm = sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * P^((sg-1)*(1-g) ) * S * FM * (1/w)^((sg-1)*(1-g)+1);
FX_norm = sg^(-sg) * (sg-1)^(sg-1) * (g*qD)^(g*(sg-1)) * (1-g)^((1-g)*(sg-1)) * P^((sg-1)*(1-g) ) * S * FX * (1/w)^((sg-1)*(1-g)+1);
end